package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreRoleAddrUsesPK implements Serializable {
    public Long addressId;
    public String use;
    public Long roleId;
    public Long roleVersionNum;

    public RimCoreRoleAddrUsesPK() {
    }

    public RimCoreRoleAddrUsesPK(Long addressId, String addressUseCode, 
                                 Long roleId, Long roleVersionNum) {
        this.addressId = addressId;
        this.use = addressUseCode;
        this.roleId = roleId;
        this.roleVersionNum = roleVersionNum;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreRoleAddrUsesPK) {
            final RimCoreRoleAddrUsesPK otherRimCoreRoleAddrUsesPK = (RimCoreRoleAddrUsesPK) other;
            final boolean areEqual = 
                (otherRimCoreRoleAddrUsesPK.addressId.equals(addressId) && otherRimCoreRoleAddrUsesPK.use.equals(use) && otherRimCoreRoleAddrUsesPK.roleId.equals(roleId) && otherRimCoreRoleAddrUsesPK.roleVersionNum.equals(roleVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
